<template>
	<section id="mine">
		<div class="mineBox">
			<div class="mine_top">
				<div class="mine_topInfo">
					<div class="mine_topInfo_img">
						<img src="@/asserts/images/loginImg.png"/>
					</div>
					<div class="mine_topInfo_text">
						<span class="mine_topInfo_textName">YANYONG</span>
						<span class="mine_topInfo_textCon">复制邀请码</span>
					</div>
				</div>
				<div class="getMoney_but">
					去领钱>
				</div>
				<div style="clear:both"></div>
			</div>
			
			<!-- banner区 @click="clickoverlay()"-->
			<div class="redPacket_banner">
				<van-swipe :autoplay="3000" indicator-color="white">
					<van-swipe-item v-for="(itembanner,index) in images" :key="index">
						<img :src="itembanner.img"/>
					</van-swipe-item>
				</van-swipe>
			</div>
		</div>
	</section>
</template>

<script>
	export default {
		data() {
			return {
				images:[
					{
						img:'../asserts/images/banner01.jpg'
					},
					{
						img:'../asserts/images/banner02.jpg'
					}
				],
			};
		},
		components: {
		},
		methods: {
			// 点击wide界面的时候先判断是否登录没有登录直接显示登录页
			getDates(){
				// 如果已经登录成功我就会把返回的用户信息存储到本地，然后再点击我的界面后， 就先判断本地存储里是否含有用户信息
				// 如果含有则进行正常的请求并把用户信息中的id(看后台需要传递什么参数给它 ，当前是吧id传给后台),传给后台，
				// 然后后台根据id返给我该用户的其他信息
				if(window.sessionStorage.userInfo){
						// 把这个信息转一下 转成json格式
						var uObj=JSON.parse(window.sessionStorage.userInfo);
						this.$http.get('/userinfo',{
								params:{
										uId:uObj.user_id
								}
						}).then((res)=>{
							this.getInfo = res.data;
						})
				}else{
						this.$router.push('/login')
				}
			}
		},
		mounted() {
			// this.getDates()
		},
		computed: {

		}
	};
</script>
<style scoped lang="scss">
	@import "@/asserts/styles/mine/mine.scss";
</style>
